/*
 *  This class is part of WorkTimeCalculator Android App
 *  Author: Domenico Pio Novelli
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.dpndeveloper.wtc.dataprovider;

/**
 * Class of constants related to database
 * 
 * @author: Domenico Pio Novelli
 */
public class DbConstants {

	/* Constants for Table interval and its columns */

	/**
	 * Constant for the name of Time Interval table
	 */
	public static final String		TABLE_TIME_INTERVAL					= "interval";

	/**
	 * Constant for the column ID of Time Interval table
	 */
	public static final String		TABLE_TIME_INTERVAL_F_ID			= "id";

	/**
	 * Constant for the column Start Time of Time Interval table
	 */
	public static final String		TABLE_TIME_INTERVAL_F_START_TIME	= "startTime";

	/**
	 * Constant for the column End Time of Time Interval table
	 */
	public static final String		TABLE_TIME_INTERVAL_F_END_TIME		= "endTime";

	/**
	 * Constant for the column Description of Time Interval table
	 */
	public static final String		TABLE_TIME_INTERVAL_F_DESCRIPTION	= "description";

	/**
	 * Array of columns of table interval
	 */
	public static final String[]	TABLE_TIME_INTERVAL_COLUMNS			= new String[] {
			TABLE_TIME_INTERVAL_F_ID, TABLE_TIME_INTERVAL_F_START_TIME,
			TABLE_TIME_INTERVAL_F_END_TIME, TABLE_TIME_INTERVAL_F_DESCRIPTION };

	/**
	 * SQL query to create table Interval
	 */
	public static final String		TABLE_TIME_INTERVAL_CREATE_STRING	= "CREATE TABLE "
																				+ DbConstants.TABLE_TIME_INTERVAL
																				+ " ("
																				+ DbConstants.TABLE_TIME_INTERVAL_F_ID
																				+ " INTEGER PRIMARY KEY AUTOINCREMENT, "
																				+ DbConstants.TABLE_TIME_INTERVAL_F_START_TIME
																				+ " LONG NOT NULL, "
																				+ DbConstants.TABLE_TIME_INTERVAL_F_END_TIME
																				+ " LONG, "
																				+ DbConstants.TABLE_TIME_INTERVAL_F_DESCRIPTION
																				+ " TEXT);";

	/**
	 * Constant for name of file to store database
	 */
	public static String			DB_NAME								= "wtcdb.sqlite";
}
